export function getEvalVariable(code) {
  let res = `{${code.match(/var(.*?)=/g).map(function (val) {
    let v = val.replace(/var|=/g, "");
    return v + ":" + v;
  })}}`;
  let result = eval(`(()=>{${code}return ${res}})()`);
  return result;
}
